<?php

$col = array();
$col["title"] = "Customer ID";
$col["name"] = "idcustomer";
$col["align"] = "center";
$col["width"] = "60";
$cols[] = $col;

$col = array();
$col["title"] = "Last Name";
$col["name"] = "lastname";
$col["align"] = "center";
$cols[] = $col;

$col = array();
$col["title"] = "First Name";
$col["name"] = "firstname";
$col["align"] = "center";
$cols[] = $col;

$col = array();
$col["title"] = "MI";
$col["name"] = "middleinitial";
$col["align"] = "center";
$col["width"] = "40";
$cols[] = $col;

$col = array();
$col["title"] = "Address";
$col["name"] = "address";
$col["align"] = "center";
$col["width"] = "250";
$cols[] = $col;

$col = array();
$col["title"] = "Contact No.";
$col["name"] = "contactno";
$col["align"] = "center";
$col["width"] = "100";
$cols[] = $col;

$col = array();
$col["title"] = "Email";
$col["name"] = "email";
$col["align"] = "center";
$col["width"] = "250";
$cols[] = $col;

$col = array();
$col["title"] = "Joined";
$col["name"] = "timestamp";
$col["search"] = true;
$col["align"] = "center";
$cols[] = $col;

$g = new jqgrid();
$grid["rowNum"] = 23;
$grid["rowList"] = array(23,35,50);
$grid["caption"] = "Crossline Customers";
$grid["sortname"] = 'timestamp';
$grid["sortorder"] = "desc";
$grid["viewrecords"] = true;
$grid["autowidth"] = true;
$grid["height"] = "535";
$grid["multiselect"] = false;
$grid["showhidecolumns"] = true;


$g->set_options($grid);


$g->set_actions(array(
    "add" => false,
    "edit" => false,
    "delete" => false,
    "rowactions" => false,
    "search" => "advance"
        )
);

//$e["on_insert"] = array("add_product", null, false);
//$e["on_update"] = array("update_product", null, false);
//$g->set_events($e);

$g->select_command = "SELECT * FROM customer WHERE active=true";

$g->table = "customer";

$g->set_columns($cols);

$out = $g->render("list1");
?>
